<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>DLC Search Engine: src/main/java/DataAccess/factories/DAOFactory.java Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">DLC Search Engine
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Packages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="headertitle">
<div class="title">src/main/java/DataAccess/factories/DAOFactory.java</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_d_a_o_factory_8java.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a><a class="code" href="namespacedataaccess_1_1factories.html">00001</a> <span class="keyword">package </span>dataaccess.factories;
<a name="l00002"></a>00002 
<a name="l00003"></a>00003 <span class="keyword">import</span> dataaccess.dao.DocumentDAO;
<a name="l00004"></a>00004 <span class="keyword">import</span> dataaccess.dao.PostListDAO;
<a name="l00005"></a>00005 <span class="keyword">import</span> dataaccess.dao.WordDAO;
<a name="l00006"></a>00006 <span class="keyword">import</span> dataaccess.factories.PostgreSQLDAOFactory;
<a name="l00007"></a>00007 
<a name="l00013"></a><a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html">00013</a> <span class="keyword">public</span> <span class="keyword">abstract</span> <span class="keyword">class </span><a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html">DAOFactory</a> {
<a name="l00014"></a>00014 
<a name="l00015"></a>00015     <span class="comment">//Definimos los tipos de factories</span>
<a name="l00016"></a><a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#acc94ae4fe422fa5d0dd7f33f6900e8c2">00016</a>     <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">int</span> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#acc94ae4fe422fa5d0dd7f33f6900e8c2">POSTGRE</a> = 1;
<a name="l00017"></a>00017     <span class="comment">//Definimos la factory activa (tipo de persistencia a utilizar) </span>
<a name="l00018"></a><a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a7d2a62ea6bfc7fcae70a8ea41311c921">00018</a>     <span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">final</span> <span class="keywordtype">int</span> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a7d2a62ea6bfc7fcae70a8ea41311c921">activeFactoryPostgre</a> = <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#acc94ae4fe422fa5d0dd7f33f6900e8c2">POSTGRE</a>;
<a name="l00019"></a>00019 
<a name="l00020"></a>00020     <span class="keyword">public</span> <span class="keyword">abstract</span> <a class="code" href="interfacedataaccess_1_1dao_1_1_word_d_a_o.html">WordDAO</a> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a221a85bee4a075cbe37fc5acce7ba339">getWordDAO</a>();
<a name="l00021"></a>00021 
<a name="l00022"></a>00022     <span class="keyword">public</span> <span class="keyword">abstract</span> <a class="code" href="interfacedataaccess_1_1dao_1_1_document_d_a_o.html">DocumentDAO</a> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#abac444c4c5d3e3efed06d705dcaf5071">getDocumentDAO</a>();
<a name="l00023"></a>00023 
<a name="l00024"></a>00024     <span class="keyword">public</span> <span class="keyword">abstract</span> <a class="code" href="interfacedataaccess_1_1dao_1_1_post_list_d_a_o.html">PostListDAO</a> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a009cb6291e5e866156029f5c976cc2f3">getPostListDAO</a>();
<a name="l00025"></a>00025 
<a name="l00026"></a><a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a864f26b4b95f2f624a36b22b56fd1110">00026</a>     <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html">DAOFactory</a> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a864f26b4b95f2f624a36b22b56fd1110">getDAOFactory</a>(<span class="keywordtype">int</span> factory) {
<a name="l00027"></a>00027 
<a name="l00028"></a>00028         <span class="keywordflow">switch</span> (factory) {
<a name="l00029"></a>00029             <span class="keywordflow">case</span> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#acc94ae4fe422fa5d0dd7f33f6900e8c2">POSTGRE</a>:
<a name="l00030"></a>00030                 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="classdataaccess_1_1factories_1_1_postgre_s_q_l_d_a_o_factory.html">PostgreSQLDAOFactory</a>();
<a name="l00031"></a>00031             <span class="keywordflow">default</span>:
<a name="l00032"></a>00032                 <span class="keywordflow">return</span> null;
<a name="l00033"></a>00033         }
<a name="l00034"></a>00034     }
<a name="l00035"></a>00035 
<a name="l00040"></a><a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a525efdb633c40ced45c0d2f916887ddc">00040</a>     <span class="keyword">public</span> <span class="keyword">static</span> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html">DAOFactory</a> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a525efdb633c40ced45c0d2f916887ddc">getActiveDAOFactory</a>() {
<a name="l00041"></a>00041         <span class="keywordflow">return</span> <a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a864f26b4b95f2f624a36b22b56fd1110">getDAOFactory</a>(<a class="code" href="classdataaccess_1_1factories_1_1_d_a_o_factory.html#a7d2a62ea6bfc7fcae70a8ea41311c921">activeFactoryPostgre</a>);
<a name="l00042"></a>00042     }
<a name="l00043"></a>00043 }
</pre></div></div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Thu Feb 16 2012 02:45:40 for DLC Search Engine by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
